Repository navigation
feat(web): a chat opens where you left it - #987
Merged
Merged
Conversation
Each thread remembers the row at the top of the view and how far into it the view was, in memory, when its chat is left above the end. Coming back opens the list there on its first frame. A chat left at the end, one with news since (an unseen completion or failure, or a status that needs you), one opened at a find target, and one whose row is gone open at the end as before. Archive and delete forget the entry.
- Read the list when the chat is left, not when the save was armed: a pinned list rebuilt after a turn settles left a dead handle that threw. - A restored chat starts as at the end for the scroll-to-bottom button, so the list's first report above the end shows it. - A failure already seen is not news; only unseen failures, approvals and questions open the chat at the end. - A full thread list after a reconnect forgets archived and deleted threads, as terminal state does. - The browser test harness clears scroll memory per mount.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
…mory # Conflicts: # apps/web/src/components/ChatView.sidebar.browser.tsx
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Leaving a chat scrolled up and coming back used to open it at the end, so you lost your place every time you switched threads.
Each chat now remembers the row at the top of the view and how far into that row you were, in memory for the window (a reload opens every chat at the end). Coming back opens the list right there on its first drawn frame, with no flash of the end.
It opens at the end, as before, when:
Archiving or deleting a thread forgets its place, including when the thread list is rebuilt after a reconnect. At most 300 threads are remembered; the one left longest ago goes first. Only the main chat is covered, not the side panel.
Nothing runs while scrolling: the place is read once when a chat is left, and once when it opens.
Tests: pure tests for the memory rules, a news-rule test, and browser tests that the same row lands within 2px on every frame from the first, that a chat left at the end or with news opens at the end, and that a find result wins.